<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/paper.css" type="text/css" rel="stylesheet">
</block>
<block name="header">
    <include file="Public/nav"/>
</block>
<block name="body">
    <div class="clearfix ">
        <include file="Public/_hot_sell"/>
        <div class="col-xs-3">
            <div class="common_block_border">

                <div class="content ">
                    <ul class="menu-one">
                        <volist name="cat_list" id="vo">
                            <php>
                                if($i == 1){
                                $class='firstChild';
                                }else{
                                $class='';
                                }
                                if($vo['type']=='article'){
                                if($vo['id'] == $id ){
                                $class.=' menu-show';
                                }
                                }else{
                                if($vo['id'] == $top_id ){
                                $class.=' menu-show';
                                }
                                }
                            </php>
                            <li class="{$class}">
                                <if condition="$vo['type'] eq 'article'">
                                    <div class="header open">
                                        <a href="{:U('Paper/Index/index',array('id'=>$vo['id']))}" class="txt" style="width: 100%">{$vo.title}</a>
                                    </div>
                                    <ul class="menu-two">
                                    </ul>
                                    <else/>
                                    <div class="header open">
                                        <a class="txt" style="width: 100%">{$vo.title} <span class="arrow"></span></a>
                                    </div>
                                    <ul class="menu-two" <if condition="$vo['id'] eq $top_id">style="display:block"</if>>
                                        <volist name="vo['children']" id="cd">
                                            <php>
                                                if($i == 1){
                                                $class='firstChild';
                                                }else{
                                                $class='';
                                                }
                                            </php>
                                            <li class="{$class}">
                                                <a href="{:U('Paper/Index/index',array('id'=>$cd['id']))}">{$cd.title}</a>
                                            </li>
                                        </volist>
                                    </ul>
                                </if>

                            </li>
                        </volist>
                    </ul>
                </div>
            </div>
            <script>
                $(document).ready(function () {
                    var aMenuOneLi = $(".menu-one > li");
                    var aMenuTwo = $(".menu-two");
                    $(".menu-one > li > .open").each(function (i) {
                        $(this).click(function () {
                            if ($(aMenuTwo[i]).css("display") == "block") {
                                $(aMenuTwo[i]).slideUp(300);
                                $(aMenuOneLi[i]).removeClass("menu-show")
                            } else {
                                for (var j = 0; j < aMenuTwo.length; j++) {
                                    $(aMenuTwo[j]).slideUp(300);
                                    $(aMenuOneLi[j]).removeClass("menu-show");
                                }
                                $(aMenuTwo[i]).slideDown(300);
                                $(aMenuOneLi[i]).addClass("menu-show")
                            }
                        });
                    });
                });
            </script>

        </div>
        <div class="col-xs-9">
            <div class="common_block_border">
                <div class="right_title">
                    <if condition="isset($cate)">
                        <span>{$cate.title}></span>
                    </if>
                    <span>{$content_title.title}</span>
                    <div class="pull-right" style="margin-top: 3px;margin-right: 6px;">
                        {:W('Common/Share/detailShare')}
                    </div>
                </div>
                <div style="padding: 10px;">{$data.content}</div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>
</block>